import request from '@/utils/request';

export interface ForumsItem {
  _id: number;
  userID: string;
  content: string;
  title: string;
  categories: string;
}

// 1. 获取标签
export function getForums(params = {}) {
  return request({
    url: '/forums',
    method: 'post',
    data: params
  });
}

export function addForums(data: any = {}) {
  return request({
    url: '/addForums',
    method: 'post',
    data
  });
}

export function deleteForums(params = {}) {
  return request({
    url: '/deleteForums',
    method: 'post',
    data: params
  });
}

export function updateForums(params = {}) {
  return request({
    url: '/updateForums',
    method: 'post',
    data: params
  });
}

export function uploadForums(params = {}) {
  return request({
    url: '/uploadForums',
    method: 'post',
    data: params
  });
}
